package com.ruoyi.web.controller.bpm;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.BpmSupplier;
import com.ruoyi.common.core.domain.entity.SysDept;

import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.service.SysPermissionService;
import com.ruoyi.framework.web.service.TokenService;

import com.ruoyi.system.service.IBpmSupplierService;
import com.ruoyi.system.service.ISysDeptService;

import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 角色信息
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/system/bpm/supplier")
public class BpmSupplierController extends BaseController {
    @Autowired
    private IBpmSupplierService bpmSupplierService;

    // @PreAuthorize("@ss.hasPermi('bpm:supplier:list')")
    @GetMapping("/list")
    public TableDataInfo list(BpmSupplier bpmSupplier) {
        startPage();
        List<BpmSupplier> list = bpmSupplierService.selectBpmSupplierList(bpmSupplier);
        return getDataTable(list);
    }

    @GetMapping("/test")
    public AjaxResult test() {

        AjaxResult ajax = AjaxResult.success();
        BpmSupplier bpmSupplier1=bpmSupplierService.test();


        ajax.put("aaa",bpmSupplier1);

        return ajax;
    }

}
